import request from "@/utils/request.js";

//获取车间对应的产品号
export const reqMaterialListByGrid = (gridCodes) => {
    return request({
        url:"/assemblyReports/materialCodeList",
        method:"get",
        params:{
            state:2,
            gridCodes:gridCodes
        }
    })
}

//入库
export const reqEntryWarehouse = (parameters) => {
    return request({
        url:"/assemblyReports/createdStockIn",
        method:"post",
        data:parameters
    })
}

//批量入库
export const reqEntryWarehouseBatch = (parameter) => {
    return request({
        url:"/assemblyReports/createdStockInBatch",
        method:"post",
        data:parameter
    })
}

//查询仓库信息接口
export function reqWareHouseInfo () {
    return request ({
        url:"/api/stocks/warehouseList1",
        method:"get"
    })
}

//查询订单已完成的数量(已入库的合格和不合格数量)
export function reqFinishedOrderNum(orderNumber){
    return request({
        url:"/assemblyReports/finishAmount?productOrderNumber=" + orderNumber,
        method:"get"
    })
}

//查询订单的相关领补套数
export function reqSupplementNumByOrderNumber(orderNum){
    return request({
        url:"/k3cloud/executedUpdateMesByOrderNumber",
        method:"get",
        params:{
            orderNumber:orderNum
        }
    })
}

//查询已驳回的数据进行显示
export function reqRejectStockListByCurUser(){
    return request({
        url:"/assemblyReports/stockListByCurrentUser?filedOne=1&page=1&size=100",
        method:"get"
    })
}

//删除驳回的入库订单
export function reqDelRejectStockOrder(orderNumberList){
    return request({
        url:"assemblyReports/batchRejected",
        method:"delete",
        data:orderNumberList
    })
}